package api

import (
	"github.com/gin-gonic/gin"
	"test.com/dao"
	"time"
)

func SaveUser(ctx *gin.Context) {

	user := &dao.User{
		Username:   "zangsan",
		Password:   "123456",
		CreateTime: time.Now().UnixMilli(),
	}
	dao.SaveUser(user)
	ctx.JSON(200, user)
}

func GetUser(ctx *gin.Context) {

	user := dao.GetUserById(1)
	ctx.JSON(200, user)
}
